<template>
  <li class="userListContainer">
    <img :src="item.sns_avatar" class="sns_avatar">
    <div class="">
      <div class="sns_username">
        <strong style="color: rgb(255, 230, 0);">{{ item.sns_username }}</strong>
        <time style="color: rgb(255, 255, 255);">{{ item.created_at }}</time>
      </div>
      <span class="remake" style="color: rgb(255, 255, 255);">红包领得好，吃饭没烦恼</span>
    </div>
    <div class="lucky-box">
      <div class="amount" style="color: rgb(255, 230, 0);"> {{ item.amount }}元</div>
      <img class="is_lucky" v-if="item.is_lucky" src="../../../assets/lucky.png" alt="">
    </div>
  </li>

</template>

<script>
  export default {
    name: "list",
    props: ['item']
  }
</script>

<style scoped>

  .userListContainer {
    padding: 0.25rem 0.4rem;
    list-style-type: none;
  }

  .sns_avatar {
    width: 1rem;
    border-radius: .04rem;
    overflow: hidden;
    margin-right: .32rem;
    max-width: 100%;
    float: left;
  }

  .sns_username {
    padding: 0.1rem;
  }

  strong {
    color: rgb(255, 230, 0);
    font-size: .25rem;
    max-width: 1rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: middle;
  }

  time {
    font-size: .25rem;
    font-weight: 400;
    vertical-align: middle;
    color: #fff;
  }

  .remake {
    font-size: .25rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    vertical-align: middle;
  }

  .lucky-box {
    float: right;
    position: relative;
    bottom: 0.7rem;
  }

  .amount {
    font-size: 0.3rem;
    text-align: right;
  }

  .is_lucky {
    width: 1.4rem;
  }
</style>
